import Vue from 'vue'
import Router from 'vue-router'
import Main from '../components/Main'
import Login from '../components/Login'
import Index from '../components/Index'

import User from '../components/User'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: Index,
      children: [
        { 
            path: 'main',
            name: 'Main',
            component: Main,
            children:[
                {
                  path: '/user',
                  name: 'User',
                  component: User
                }
            ]
        },
        { path: 'login', name: 'Login', component: Login },
      ]
    }
  ]
})
